package main

import (
	"fmt"
	"github.com/doujunyu/gogo/gogo"
	_ "github.com/go-sql-driver/mysql"
	_ "github.com/joho/godotenv/autoload"
	_ "github.com/lib/pq"
	"go_self/model"
	"go_self/route"
	"os"
)

func main() {

	r := gogo.ReadyGo()
	if err := model.MySqlLine();err != nil{
		fmt.Println(err)
		return
	}
	if err := model.PgSqlLine();err != nil{
		fmt.Println(err)
		return
	}
	if err := model.RedisLine();err != nil{
		fmt.Println(err)
		return
	}
	route.Route(r)
	r.Run(os.Getenv("SERVER_PORT"))
}
